package com.zbkj.admin.controller.region;

import com.zbkj.common.page.CommonPage;
import com.zbkj.common.request.*;
import com.zbkj.common.response.FundsFlowResponse;
import com.zbkj.common.response.PlatformStatementResponse;
import com.zbkj.common.result.CommonResult;
import com.zbkj.service.service.adminregion.IRegionFinanceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;


/**
 +----------------------------------------------------------------------
 */
@Slf4j
@RestController
@RequestMapping("api/admin/region/finance")
@Api(tags = "区域端-财务控制器")
public class RegionFinanceController {

    @Autowired
    private IRegionFinanceService regionFinanceService;

    @ApiOperation(value = "资金流水分页列表")
    @RequestMapping(value = "/funds/flow", method = RequestMethod.GET)
    public CommonResult<CommonPage<FundsFlowResponse>> getFundsFlow(@ModelAttribute FundsFlowRequest request,
                                                                    @ModelAttribute PageParamRequest pageParamRequest) {
        return CommonResult.success(CommonPage.restPage(regionFinanceService.getFundsFlow(request, pageParamRequest)));
    }



}



